<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>labahuashu</title>
  <script>
      var multiply = function(n){
        var sum = 1;
        for (var i = n; i > 0; i--){
            sum *= i;
        }
        return sum;
      } 
      var m = function(digits){
        var singles = digits % 10;;
        var tens = parseInt(digits / 10) % 10;
        var hundreds = parseInt(digits / 100);
        // console.log(digits, singles, tens, hundreds);
        var total = 0;
        total += multiply(singles);
        total += multiply(tens);
        total += multiply(hundreds);
        return (total == digits);
      }
      var arr = [];
      for (var i = 100; i < 1000; i++){
        if (m(i))
          arr.push(i);
      }
      console.log(arr);
 </script>
</head>
<body>
  
</body>
</html>